<%-- 
    Document   : feGroup
    Created on : Aug 24, 2011, 10:11:18 PM
    Author     : Valentina
--%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link href="default.css" rel="stylesheet" type="text/css" />
        <title>Group List</title>
    </head>
    <body>
        <jsp:include page="/WEB-INF/frontend/commons/header.jspf"></jsp:include>

            <table width="740" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                    <td>
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td><img src="images/spacer.gif" alt="" width="100" height="30" /></td>
                            </tr>
                            <tr>
                                <td class="title">Group List</td>
                            </tr>

                            <tr>
                                <td>
                                    <form action="GroupAddServlet" method="POST">
                                        <p>Name <input type="text" name="name" value="" size="20" /></p>
                                        <p>Description <textarea name="description"></textarea></p>
                                        <input type="submit" value="Add" />
                                    </form>
                                </td>
                            </tr>
                            <tr>

                            <table class="border_table">
                                <thead>
                                    <tr>
                                        <td>Nr.</td>
                                        <td>Name</td>
                                        <td>Update</td>
                                        <td>Delete</td>
                                    </tr>
                                </thead>
                                <tbody>
                                <c:forEach var="group" items="${groups}" varStatus="status" >
                                    <tr>
                                        <td>${status.count}</td>
                                        <td>${group.name}</td>
                                        <td><a href="GroupPrepareUpdateServlet?idgroup=${group.id}">Update</a></td>
                                        <td><a href="GroupDeleteServlet?idgroup=${group.id}" onclick="return confirm('Are you sure you want to delete?')">Delete</a></td>
                                    </tr>
                                </c:forEach>
                            </tbody>
                        </table>
            </tr>   

        </table>
    </td>
</tr>
</table>

<jsp:include page="/WEB-INF/frontend/commons/footer.jspf"></jsp:include>
</body>
</html>
